]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
power: indicate 1 hour remaining correctly
authorSebastian Keller <sebastian-keller@gmx.de>
Fri, 9 Nov 2012 04:09:53 +0000 (05:09 +0100)
committerBastien Nocera <hadess@hadess.net>
Fri, 9 Nov 2012 16:19:05 +0000 (17:19 +0100)
Before 60 minutes remaining were displayed
as "0 minutes" now it is "1 hour".

https://bugzilla.gnome.org/show_bug.cgi?id=687958

js/ui/status/power.js

index a5f2625f5e029dbfe909ddcec9c26961c62d4d84..d80407207078f169faa8d5b8b5aef721a86dc1a4 100644 (file)
@@ -96,7 +96,7 @@ const Indicator = new Lang.Class({
                     let minutes = time % 60;
                     let hours = Math.floor(time / 60);
                     let timestring;
-                    if (time > 60) {
+                    if (time >= 60) {
                         if (minutes == 0) {
                             timestring = ngettext("%d hour remaining", "%d hours remaining", hours).format(hours);
                         } else {